***Empirical Analyses***


cd "..."
use replication.dta, clear

global controls politicalinterest stfdem tradeunion feelingincome trstprt educ gender age

eststo mlogit1: mlogit participation2 congruencemedian  $controls i.country i.year, robust
eststo mlogit2: mlogit participation2 congruencemedian  $controls eff_nr_parl_parties lag1 v2x_libdem_codelow i.country i.year, robust

mgen,at((means) $controls eff_nr_parl_parties lag1 v2x_libdem_codelow congruence=(0(1)8)  (median) gender) saving(mlogitcloserparty, replace)

**Figure 1

twoway (rarea _ll0 _ul0 _congruencemedian, color(pink%50)) (rarea _ll1 _ul1 _congruencemedian, color(green%50)) (rarea _ll2 _ul2 _congruencemedian, color(navy%50)) (rarea _ll3 _ul3 _congruencemedian, color(orange%50)) (line _pr0 _congruencemedian, lcol(pink%50) lpat(solid)) (line _pr1 _congruencemedian, lcol(green%50) lpat(solid)) (line _pr2 _congruencemedian, lcol(navy%50) lpat(solid)) (line _pr3 _congruencemedian, lcol(orange%50) lpat(solid)) (hist congruencemedian if e(sample),  percent yaxis(2) yscale(off axis(2)) color(black%15) lcolor(white) xlab(0(1)8)),  legend(order(5 "Pr(Not Voted & Not Protested)" 6 "Pr(Voted & Not Protested)" 7 "Pr(Not Voted & Protested)" 8 "Pr(Voted & Protested)") position(6) rows(1) size(vsmall)) xlab(0(1)8) ylab (0(.1).9) xtitle("Ideological Incongruence") name(marginscong, replace) 
graph export figure1.pdf, replace

drop _est_mlogit1-_Cpr3

**Figure 2

eststo mlogit3: mlogit participation2 c.congruencemedian##i.closeparty $controls eff_nr_parl_parties lag1 v2x_libdem_codelow i.country i.year, robust

mgen,at((means) $controls eff_nr_parl_parties lag1 v2x_libdem_codelow congruence=(0(1)8) closeparty=(0 1) (median) gender) saving(mlogitcloserparty, replace)
	
local i=1
foreach m in 0 1{
local title = "Feeling Close to a Party" + word("=0 =1", `i')	
twoway (rarea _ll0 _ul0 _congruencemedian if _closeparty==`m', color(pink%50)) (rarea _ll1 _ul1 _congruencemedian if _closeparty==`m', color(green%50)) (rarea _ll2 _ul2 _congruencemedian if _closeparty==`m', color(navy%50)) (rarea _ll3 _ul3 _congruencemedian if _closeparty==`m', color(orange%50)) (line _pr0 _congruencemedian if _closeparty==`m', lcol(pink%50) lpat(solid)) (line _pr1 _congruencemedian if _closeparty==`m', lcol(green%50) lpat(solid)) (line _pr2 _congruencemedian if _closeparty==`m', lcol(navy%50) lpat(solid)) (line _pr3 _congruencemedian if _closeparty==`m', lcol(orange%50) lpat(solid)) (hist congruencemedian if e(sample) & closeparty==`m',  percent yaxis(2) yscale(off axis(2)) color(black%15) lcolor(white) xlab(0(1)8)),  legend(order(5 "Pr(Not Voted & Not Protested)" 6 "Pr(Voted & Not Protested)" 7 "Pr(Not Voted & Protested)" 8 "Pr(Voted & Protested)") position(6) rows(1) size(vsmall)) xlab(0(1)8) ylab (0(.1).9) xtitle("Distance from Median Government L/R Position") name(margins`i', replace) title("`title'")
    loc ++i
}

grc1leg2 margins1 margins2, row(1) xtob1title legendfrom(margins1) ring(10)
graph export figure2.pdf, replace

	
**Table 1
latab voted pbldmn_new if e(sample)
latab voted pbldmn_new if e(sample), row

**Table A2
replace cntry = proper(cntry)
latabstat voted pbldmn_new, by(cntry) format(%9.2f)

**Table 2

esttab mlogit1 mlogit2 mlogit3 using "table1.tex", tex replace b(%10.3f) se stats(ll N aic bic, labels("Log lik." "N" "AIC" "BIC") fmt(%10.3f %10.3f %10.0f)) label starlevels(* 0.1 ** 0.05 *** 0.01) title("Multinomial Logistic Regression Estimates") varlabels(_cons  Constant) addnote("Notes: Base Category is Voting but not Protesting.""Robust standard errors in parentheses. Two-tailed tests.") nobase nonumbers  noomit obslast  compress long mtitle("Model 1" "Model 2" "Model 3") 


**Robustness Checks****

**Table A4

eststo mean: mlogit participation2 c.congruence##i.closeparty $controls eff_nr_parl_parties lag1 v2x_libdem_codelow, robust


esttab mean using "table2.tex", tex replace b(%10.3f) se stats(ll N aic bic chi2, labels("Log lik." "N" "AIC" "BIC") fmt(%10.3f %10.3f %10.0f)) label starlevels(* 0.1 ** 0.05 *** 0.01) title("Robustness Checks") varlabels(_cons  Constant) addnote("Notes: Base Category is Voting but not Protesting.""Robust standard errors in parentheses. Two-tailed tests.") nobase nonumbers  noomit obslast  compress long mtitle("Distance from Mean Government Position") 

**Table A5

eststo gsem: gsem (b1.participation2 <- c.congruencemedian##i.closeparty politicalinterest stfdem tradeunion feelingincome trstprt educ gender age eff_nr_parl_parties lag1 v2x_libdem_codelow M1[country]@1), mlogit iterate(20)


esttab gsem  using "table3.tex", tex replace b(%10.3f) se stats(ll N aic bic, labels("Log lik." "N" "AIC" "BIC") fmt(%10.3f %10.3f %10.0f)) label starlevels(* 0.1 ** 0.05 *** 0.01) title("Multilevel Multinomial Logistic Regression Estimates") varlabels(_cons  Constant) addnote("Notes: Base Category is Voting but not Protesting.""Standard errors in parentheses. Two-tailed tests.") nobase nonumbers  noomit obslast  compress long mtitle("Model 1") 


**Table A1

use replication, clear
qui mlogit participation2 c.congruencemedian##i.closeparty $controls eff_nr_parl_parties lag1 fed v2x_libdem_codelow, robust
gen sample=e(sample)
eststo desc: estpost sum participation2 congruencemedian closeparty politicalinterest stfdem tradeunion hincfel  trstprt educ gender age  eff_nr_parl_parties lag1 fed v2x_libdem_codelow if sample
esttab desc using appendixdescriptive.tex, replace cells("mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2)) count(fmt(0))") collabels("Mean" "Std.Dev." "Min." "Max." "N") noobs nonumber label title("Descriptive Statistics") longtable
 
qui mlogit participation2 c.congruence##i.closeparty $controls eff_nr_parl_parties lag1 fed v2x_libdem_codelow, robust
gen sesample= e(sample)
eststo desc2: estpost sum congruence if sesample

esttab desc desc2 using appendixdescriptivese.tex, replace cells("mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2)) count(fmt(0))") collabels("Mean" "Std.Dev." "Min." "Max." "N") noobs nonumber label title("Descriptive Statistics") longtable


**Figure A1

twoway (scatter year country if chessyear==2010, msymbol(circle)) (scatter year country if chessyear==2014, msymbol(diamond)) (scatter year country if chessyear==2019, msymbol(triangle)), ytitle("ESS Survey Years") xtitle("") ylabel(2012(2)2018) xlabel(1(1)13, labels labsize(tiny)  format(%9.0g) valuelabel angle(vertical)) legend(order(1 "CHES 2010" 2 "CHES 2014" 3 "CHES 2019") position(6) row(1)) 
graph export figureA1.pdf, replace

**Figure A2
gen notvotednotprotest=1 if participation2==0
replace notvotednotprotest=0 if notvotednotprotest==.
gen votednotprotest=1 if participation2==1
replace votednotprotest=0 if votednotprotest==.
gen notvotedprotest=1 if participation2==2
replace notvotedprotest=0 if notvotedprotest ==.
gen votedprotest=1 if participation2==3
replace votedprotest=0 if votedprotest ==.
graph bar notvotedprotest votedprotest, over(country, sort(votedprotest) label(labsize(tiny)))  legend(position(6) row(1)order(1 "Substitute" 2 "Complement")) bar(1, color(navy%50)) bar( 2, color(orange%50))
graph export figureA2.pdf, replace

